#include "mytextedit.h"

#include <QtGui>

MyTextEdit::MyTextEdit(QWidget *parent) :
	QTextEdit(parent)
{
}

MyTextEdit::MyTextEdit(const QString &text, QWidget *parent) :
	QTextEdit(text, parent)
{
}

void MyTextEdit::mousePressEvent(QMouseEvent *e)
{
	QString anchor = anchorAt(e->pos());
	if (!anchor.isEmpty()) {
		emit anchorClicked(anchor);
	}
	QTextEdit::mousePressEvent(e);
}
